import { getAction, deleteAction, putAction, putparamsAction, postAction, httpAction } from '@/api/manage'
//  不合格品待处理
const messNotQualityHandleIinfo = (params) => getAction('/mess/messNotQualityHandleIinfo/list', params) // 不合格品待处理-分页列表查询
const messNotQualityHandleIinfoHandle = (params) => postAction('/mess/messNotQualityHandleIinfo/handle', params) // 处理
const queryProcessByOrderTaskId = (params) =>
  getAction('/mess/messNotQualityHandleIinfo/queryProcessByOrderTaskId', params) // 不合格工序下拉
const queryOperatorByFailedProcessId = (params) =>
  getAction('/mess/messNotQualityHandleIinfo/queryOperatorByFailedProcessId', params) // 工序查不合格操作人下拉
// 不合格品处理明细
const messNotQualityHandleIinfoDetailList = (params) => getAction('/mess/messNotQualityHandleIinfoDetail/list', params) // 明细列表
const messNotQualityHandleIinfoDetailLogicDelete = (params) =>
  deleteAction('/mess/messNotQualityHandleIinfoDetail/logicDelete', params) // id逻辑删除
const messNotQualityHandleIinfoDetailLogicDeleteBatch = (params) =>
  deleteAction('/mess/messNotQualityHandleIinfoDetail/logicDeleteBatch', params) // 批量逻辑删除
/* 不合格品执行 */
const messNotQualityHandleIinfoDetailExecuteList = (params) =>
  getAction('/mess/messNotQualityHandleIinfoDetail/executeList', params) // 执行列表
const messNotQualityHandleIinfoDetailExecuteScrap = (params) =>
  postAction('/mess/messNotQualityHandleIinfoDetail/executeScrap', params) // 执行报废
const messNotQualityHandleIinfoDetailExecuteRepair = (params) =>
  postAction('/mess/messNotQualityHandleIinfoDetail/executeRepair', params) // 发起返修
const getFullProcessByOrderId = (params) => getAction('/mess/messProductOrderTask/getFullProcessByOrderId', params) // 返修工序下拉
const messNotQualityHandleIinfoDetailQueryInfoById = (params) =>
  getAction(`/mess/messNotQualityHandleIinfoDetail/queryInfoById?id=${params}`) // 执行详情
const messNotQualityHandleIinfoDetailExecuteCompromise = (params) =>
  postAction('/mess/messNotQualityHandleIinfoDetail/executeCompromise', params) // 确认接收
const messScrapInboundApplyQueryInfoByScrapApplyId = (params) =>
  getAction(`/mess/messScrapInboundApply/queryInfoByScrapApplyId?scrapApplyId=${params}`) // 报废申请详情
const getNotQualifiedReasonStatisticsHistogram = (params) =>
  getAction('/mess/messProductReport/getNotQualifiedReasonStatisticsHistogram', params) // 不合格原因统计柱状图
const getNotQualifiedReasonPieChart = (params) =>
  getAction('/mess/messProductReport/getNotQualifiedReasonPieChart', params) // 不合格原因统计饼图
const getNotQualifiedReasonStatisticsList = (params) =>
  getAction('/mess/messProductReport/getNotQualifiedReasonStatisticsList', params) // 不合格原因统计列表
const getNotQualifiedStatisticsExtField = (params) =>
  getAction('/unqualifiedanalyze/unqualifiedAnalyze/getNotQualifiedStatisticsExtField', params) // 不合格原因动态列
const messProductBatchGenCode = (params) => getAction('/mess/messProductBatch/genCode', params) // 不合格原因动态列
export const defectsPendingApi = {
  messProductBatchGenCode,
  queryOperatorByFailedProcessId,
  getNotQualifiedStatisticsExtField,
  getNotQualifiedReasonStatisticsList,
  getNotQualifiedReasonPieChart,
  getNotQualifiedReasonStatisticsHistogram,
  queryProcessByOrderTaskId,
  messScrapInboundApplyQueryInfoByScrapApplyId,
  messNotQualityHandleIinfoDetailExecuteCompromise,
  messNotQualityHandleIinfoDetailQueryInfoById,
  getFullProcessByOrderId,
  messNotQualityHandleIinfoDetailExecuteRepair,
  messNotQualityHandleIinfoDetailExecuteScrap,
  messNotQualityHandleIinfoDetailExecuteList,
  messNotQualityHandleIinfoDetailLogicDeleteBatch,
  messNotQualityHandleIinfoDetailLogicDelete,
  messNotQualityHandleIinfoDetailList,
  messNotQualityHandleIinfoHandle,
  messNotQualityHandleIinfo,
}
